<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        // let arr = [1, 2, 3]
        // let res = Array.isArray(arr) // true
        // console.log(res);

        // let items = new Array(2);
        // console.log(items.length); // 2
        // console.log(items[0]); // undefined
        // console.log(items[1]); // undefined

        // let items = Array.of([2, 5, 8]);
        // console.log(items.length); // 1
        // console.log(items[0]); // 2

        // let a = [1, 1, 1, 2];
        // a.push(5);
        // console.log(a);

        // let b = [1, 1, 1, 2];
        // let s = [...b];
        // console.log(s);

        let str = "hello";
        let arr = Array.from(str, (value) => value + 's');
        console.log(arr); // ["h", "e", "l", "l", "o"]
    </script>
</head>

<body>

</body>

</html>